﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Jquery.IDAL
{
    /// <summary>
    /// 所有数据访问接口 基类
    /// </summary>
    public interface IBaseRepository<T> where T : class,new()
    {
        #region 查询
        IQueryable<T> LoadEntities(Func<T, bool> WhereLambda);

        IQueryable<T> LoadPageEntities<s>(int PageSize, int PageIndex, out int total, Func<T, bool> WhereLambda,
            Func<T, s> OrderLambda, bool IsAsc); 
        #endregion

        #region 增删改
        T Add(T t);

        bool update(T t);

        bool delete(T t); 
        #endregion
    }
}
